package com.mall.mymall.service.impl;

import com.mall.mymall.dao.dto.CartsDto;
import com.mall.mymall.dao.entity.Carts;
import com.mall.mymall.mapper.CartsMapper;
import com.mall.mymall.service.CartsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 十里坡
 * @since 2025-03-06
 */
@Service
public class CartsServiceImpl extends ServiceImpl<CartsMapper, Carts> implements CartsService {

    @Autowired
    CartsMapper cartsMapper;

    @Override
    public List<CartsDto> getCarts(Integer userId) {
        List<CartsDto> users = cartsMapper.getCarts(userId);
        return users;
    }
}
